package com.flyxiaozhu.erp.core.libs;

import java.util.HashMap;
import java.util.Map;

public class Constants {
    // 常量定义

    // 公用状态
    public static final int COMMON_STATUS_NORMAL = 0;

    // 用户状态
    public static final int USER_STATUS_NORMAL = 0;
    public static final int USER_STATUS_LOCKED = 1;

    // 用户操作日志类型
    public static final int SYS_OPERA_INSERT = 0;
    public static final int SYS_OPERA_UPDATE = 1;
    public static final int SYS_OPERA_DELETE = 2;

    // 商品状态
    public static final int GOODS_STATUS_NORMAL = 0;
    public static final int GOODS_STATUS_LOWER = 1;

    // 商品审核状态
    public static final int GOODS_EXAMINE_WAIT = 0;
    public static final int GOODS_EXAMINE_NORMAL = 1;
    public static final int GOODS_EXAMINE_REJECT = 99;

    // 商品类型
    public static final int GOODS_TYPE_REALITY = 1; //实物

    // 订单状态
    public static final int ORDER_STATUS_CREATED = 0;  //已创建
    public static final int ORDER_STATUS_USER_PAY = 1;  //待用户支付
    public static final int ORDER_STATUS_MERCHANT_PAY = 2; //待商户支付
    public static final int ORDER_STATUS_MERCHANT_VERIFY = 3;  //待商户审核
    public static final int ORDER_STATUS_VERIFY = 4;  //待审核
    public static final int ORDER_STATUS_DELIVERY = 5;  //待发货
    public static final int ORDER_STATUS_SENT = 6;  //待收货
    public static final int ORDER_STATUS_COMPLETED = 9;  //已完成
    public static final int ORDER_STATUS_FAILED = 10;  //已失败
    public static final int ORDER_STATUS_REFUND = 20;  //已退货
    public static final int ORDER_STATUS_EXCEPTION = 80;  //异常
    public static final int ORDER_STATUS_CLOSED = 99;  //已关闭

    // 发货和库存状态
    public static final int DELIVERY_STATUS_NORMAL = 0;  //未发货
    public static final int DELIVERY_STATUS_SENT = 1;  //已发货
    public static final int DELIVERY_STATUS_COMPLETED = 9;  //已收货
    public static final int DELIVERY_STATUS_FAILED = 10;  //已失败
    public static final int DELIVERY_STATUS_LOCKED = 19;  //已锁定
    public static final int DELIVERY_STATUS_UNLOCK = 20;  //已解锁

    // 商品审核map
    public static Map<Integer, String> GOODS_EXAMINE_MAP() {
        Map<Integer, String> goodsExamineMap = new HashMap<>();
        goodsExamineMap.put(0, "待审核");
        goodsExamineMap.put(1, "审核通过");
        goodsExamineMap.put(2, "审核失败");
        return goodsExamineMap;
    }

    // 商品状态map
    public static Map<Integer, String> GOODS_STATUS_MAP() {
        Map<Integer, String> goodsStatusMap = new HashMap<>();
        goodsStatusMap.put(0, "上架");
        goodsStatusMap.put(1, "下架");
        return goodsStatusMap;
    }

    // 商品字段Map
    public static Map<String, String> GOODS_FIELD_MAP() {
        Map<String, String> goodsFieldMap = new HashMap<>();
        goodsFieldMap.put("name", "商品名称");
        goodsFieldMap.put("goodsNo", "商品编号");
        goodsFieldMap.put("marketPrice", "市场价格");
        goodsFieldMap.put("sellingPrice", "销售价格");
        goodsFieldMap.put("categoryId", "商品分类");
        goodsFieldMap.put("tags", "商品标签");
        goodsFieldMap.put("thumb", "缩略图");
        goodsFieldMap.put("sales", "销量");
        goodsFieldMap.put("status", "状态");
        goodsFieldMap.put("examine", "审核状态");
        goodsFieldMap.put("stock", "总库存");
        goodsFieldMap.put("hasMultiSku", "是否含有多SKU");
        goodsFieldMap.put("isDeleted", "是否删除");
        goodsFieldMap.put("detail", "商品详情");
        goodsFieldMap.put("goodsPictures", "商品轮播图");
        goodsFieldMap.put("attrs", "属性");
        goodsFieldMap.put("goodsSkus", "SKU");

        return goodsFieldMap;
    }
}